<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link rel="stylesheet" type="text/css" href="../res/static/css/main.css">
    <link rel="stylesheet" type="text/css" href="../res/layui/css/layui.css">
    <script type="text/javascript" src="../res/layui/layui.js"></script>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
</head>
<body>

<div class="site-nav-bg">
    <div class="site-nav w1200">
        <p class="sn-back-home" id="adm" style="display: none">
            <i class="layui-icon layui-icon-home"></i>
            <a href="/admin">后台管理</a>
        </p>
        <div class="sn-quick-menu">
            <div id="d1" style="display: none" class="login"><a href="/register" style="color: #0C0C0C">[注册]</a></div>
            <div id="d4" style="display: none" class="login"><a href="/login" style="color: #0C0C0C;margin-left: -10px">
                [登录]</a></div>
            <div id="d2" style="display: none" class="login"><a style="color: #1E9FFF" id="user"></a></div>
            <div id="d3" style="display: none" class="login"><a id="f1" style="color: #0C0C0C"
                                                                href="javascript:;">退出登录</a></div>
        </div>
    </div>
</div>


<div class="header">
    <div class="headerLayout w1200">
        <div class="headerCon">
            <h1 class="mallLogo">
                <a href="/index" title="宠物商城" id="a1">
                    <img style="width: 50%;height: 50%" src="../res/static/img/123.png">
                </a>
            </h1>
            <div class="mallSearch">
                <form action="" class="layui-form" novalidate>
                    <input type="text" name="title" required lay-verify="required" autocomplete="off"
                           class="layui-input"
                           placeholder="请输入宠物名称">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">
                        <i class="layui-icon layui-icon-search"></i>
                    </button>
                    <input type="hidden" name="" value="">
                </form>
            </div>
        </div>
    </div>
</div>


<div class="content content-nav-base shopcart-content">
    <div class="main-nav">
        <div class="inner-cont0">
            <div class="inner-cont1 w1200">
                <div class="inner-cont2">
                    <a href="/index">首页</a>
                    <a href="/shopcart" class="active">购物车</a>
                    <a href="/about">关于我们</a>
                </div>
            </div>
        </div>
    </div>
    <div class="banner-bg w1200">
        <h3>夏季清仓</h3>
        <p>可爱小狗狗等你带回家！</p>
    </div>
    <div class="cart w1200">
        <div class="cart-table-th">
            <div class="th th-chk">
                <div class="select-all">
                    <div class="cart-checkbox">
                        <input class="check-all check" id="allCheckked" type="checkbox" value="true">
                    </div>
                    <label>&nbsp;&nbsp;全选</label>
                </div>
            </div>
            <div class="th th-item">
                <div class="th-inner">
                    商品
                </div>
            </div>
            <div class="th th-price">
                <div class="th-inner">
                    单价
                </div>
            </div>
            <div class="th th-amount">
                <div class="th-inner">
                    数量
                </div>
            </div>
            <div class="th th-sum">
                <div class="th-inner">
                    小计
                </div>
            </div>
            <div class="th th-op">
                <div class="th-inner">
                    操作
                </div>
            </div>
        </div>
        <div class="OrderList">
            <div class="order-content" id="list-cont">
                <ul class="item-content layui-clear">
                    <li class="th th-chk">
                        <div class="select-all">
                            <div class="cart-checkbox">
                                <input class="CheckBoxShop check" id="1" type="checkbox" num="all" name="select-all"
                                       value="true">
                            </div>
                        </div>
                    </li>
                    <li class="th th-item">
                        <div class="item-cont">
                            <a href="javascript:;"><img src="../../upload/2020-11-06/20201113150113eac81b623b204a1b9f00a68ec82de3fa.jpg" alt=""></a>
                            <div class="text">
                                <div class="title">柯基柯基</div>
                                <p><span>金黄色</span> <span>1</span>岁</p>
                            </div>
                        </div>
                    </li>
                    <li class="th th-price">
                        <span class="th-su">1899.00</span>
                    </li>
                    <li class="th th-amount">
                        <div class="box-btn layui-clear">
                            <div class="less layui-btn">-</div>
                            <input class="Quantity-input" type="" name="" value="1" disabled="disabled">
                            <div class="add layui-btn">+</div>
                        </div>
                    </li>
                    <li class="th th-sum">
                        <span class="sum">1899.00</span>
                    </li>
                    <li class="th th-op">
                        <span class="dele-btn">删除</span>
                    </li>
                </ul>
                <ul class="item-content layui-clear">
                    <li class="th th-chk">
                        <div class="select-all">
                            <div class="cart-checkbox">
                                <input class="CheckBoxShop check" id="" type="checkbox" num="all" name="select-all"
                                       value="true">
                            </div>
                        </div>
                    </li>
                    <li class="th th-item">
                        <div class="item-cont">
                            <a href="javascript:;"><img src="../../upload/2020-11-06/202011421455420f03e2df6a5c43a3ad096ceec04dcd12.jpg" alt=""></a>
                            <div class="text">
                                <div class="title">二哈</div>
                                <p><span>灰白色</span> <span>0.5</span>岁</p>
                            </div>
                        </div>
                    </li>
                    <li class="th th-price">
                        <span class="th-su">2000.00</span>
                    </li>
                    <li class="th th-amount">
                        <div class="box-btn layui-clear">
                            <div class="less layui-btn">-</div>
                            <input class="Quantity-input" type="" name="" value="1" disabled="disabled">
                            <div class="add layui-btn">+</div>
                        </div>
                    </li>
                    <li class="th th-sum">
                        <span class="sum">2000.00</span>
                    </li>
                    <li class="th th-op">
                        <span class="dele-btn">删除</span>
                    </li>
                </ul>
                <ul class="item-content layui-clear">
                    <li class="th th-chk">
                        <div class="select-all">
                            <div class="cart-checkbox">
                                <input class="CheckBoxShop check" id="3" type="checkbox" num="all" name="select-all"
                                       value="true">
                            </div>
                        </div>
                    </li>
                    <li class="th th-item">
                        <div class="item-cont">
                            <a href="javascript:;"><img src="../../upload/2020-11-06/202011381454388ad433d7b578448fa7e1504876d978f2.jpg" alt=""></a>
                            <div class="text">
                                <div class="title">哈士奇</div>
                                <p><span>灰白色</span> <span>1</span>岁</p>
                            </div>
                        </div>
                    </li>
                    <li class="th th-price">
                        <span class="th-su">2500.00</span>
                    </li>
                    <li class="th th-amount">
                        <div class="box-btn layui-clear">
                            <div class="less layui-btn">-</div>
                            <input class="Quantity-input" type="" name="" value="1" disabled="disabled">
                            <div class="add layui-btn">+</div>
                        </div>
                    </li>
                    <li class="th th-sum">
                        <span class="sum">2500.00</span>
                    </li>
                    <li class="th th-op">
                        <span class="dele-btn">删除</span>
                    </li>
                </ul>
            </div>
        </div>


        <div class="FloatBarHolder layui-clear">
            <div class="th th-chk">
                <div class="select-all">
                    <div class="cart-checkbox">
                        <input class="check-all check" id="4" name="select-all" type="checkbox" value="true">
                    </div>
                    <label>&nbsp;&nbsp;已选<span class="Selected-pieces">0</span>件</label>
                </div>
            </div>
            <div class="th batch-deletion">
                <span class="batch-dele-btn">批量删除</span>
            </div>
            <div class="th Settlement">
                <button class="layui-btn">结算</button>
            </div>
            <div class="th total">
                <p>应付：<span class="pieces-total">0</span></p>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">


    layui.use(['layer', 'jquery'], function () {
        var $ = layui.jquery,
            layer = layui.layer;

        initIndex();

        function initIndex() {
            $.get("/findLoginInfo", {}, function (r) {
                if (r !== "null") {
                    $('#d1').css('display', 'none');
                    $('#d2').css('display', 'block');
                    $('#d3').css('display', 'block');
                    $('#d4').css('display', 'none');
                    $('#adm').css('display', 'block');
                    $('#a1').css('margin-left', '-86px');
                    $("#user").text("你好," + r + "!");
                    $("#c").css('display', 'inline');
                    $("#admin").css('display', 'inline');
                } else {
                    $('#d1').css('display', 'block');
                    $('#d4').css('display', 'block');
                    $('#d2').css('display', 'none');
                    $('#d3').css('display', 'none');
                    $('#adm').css('display', 'none');
                    $("#c").css('display', 'inline');
                    $('#a1').css('margin-left', '0px');
                    $("#admin").css('display', 'inline');
                }
            }, "text");
        }


        $("#f1").click(function () {
            layer.confirm('确定退出登录吗？', {icon: 3}, function (index) {
                $.get("/loginOut", {}, function (r) {
                    layer.close(index);
                    index = layer.load(1, {shade: [0.1, '#fff']});
                    parent.layer.msg('安全退出中...', {icon: 16, shade: 0.3, time: 5000});
                    $.get("/loginOut", {}, function (r) {
                        layer.closeAll('loading');
                        parent.layer.msg('退出成功！', {
                            icon: 1, time: 1000, shade: 0.2, end: function () {
                                window.location.reload();
                            }
                        });
                        layer.close(index);
                    });
                });
            });
        });
    });


</script>
</body>
</html>